<template>
  <div>
    <ul>
      <li v-for="item in movieList" :key="item.id">{{ item.albumName }}</li>
    </ul>
    <hr />
    <p>长度大于4的电影</p>
    <ul>
      <li v-for="item in myMovieList" :key="item.id">{{ item.albumName }}</li>
    </ul>
    <p>长度是我发的</p>
    <ul>
      <li v-for="item in limitMovieList" :key="item.id">
        {{ item.albumName }}
      </li>
    </ul>
  </div>
</template>

<script>
import { mapGetters, mapState } from "vuex";
export default {
  name: "Header",
  data() {
    return {
      type: 0,
    };
  },
  computed: {
    ...mapState(["movieList"]),
    ...mapGetters(["myMovieList"]),
    limitMovieList() {
      return this.$store.getters.limitMovieList({ start: 3, end: 7 });
    },
  },
};
</script>

<style>
</style>